<{extend name="public/layout"}>

<{block name="h1"}>分组管理<{/block}>

<{block name="breadcrumb"}>
<li class="active">分组管理</li>
<{/block}>

<{block name="content"}>
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header"><a href="<{:url('add')}>" class="btn btn-primary"><i class="fa fa-plus"></i> 添加</a></div>
            <div class="box-body">
                <table id="example2" class="table table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>分组编号</th>
                        <th>分组名称</th>
                        <th>分组描述</th>
                        <th>分组状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <{volist name="rows" id="row"}>
                    <tr>
                        <td><{$row.unique_id}></td>
                        <td><{$row.title}></td>
                        <td><{$row.description}></td>
                        <td>
                          <{$row.status == 'normal' ? '<label class="label bg-primary">正常</label>' : '<label class="label bg-black">禁用</label>'}>
                        </td>
                        <td>
                            <a href="<{:url('edit', ['unique_id' => $row['unique_id']])}>" class="btn btn-xs btn-default">编辑</a>
                            <a href="javascript:void(0);" data-url="<{:url('delete', ['unique_id' => $row['unique_id']])}>" class="btn btn-xs btn-danger btn-delete">删除</a>
                        </td>
                    </tr>
                    <{/volist}>
                </table>
            </div>
        </div>
    </div>
</div>
<{/block}>
<{block name="js"}>
<{js href="/static/admin/js/johnxu.js"}>
<script type="text/javascript">
    $(function() {
        $('#example2').DataTable()
    })
</script>
<{/block}>